﻿@model WhiteGloss.Models.Image

@{
    ViewBag.Title = "Create";
}

<h2>Images</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm("Create", "Images", FormMethod.Post, new { enctype = "multipart/form-data" })) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>New Image</legend>

        <div class="editor-label">
            @Html.LabelFor(model => model.ArtistId, "Artist")
        </div>
        <div class="editor-field">
            @Html.DropDownList("ArtistId", String.Empty)
            @Html.ValidationMessageFor(model => model.ArtistId)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Description)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Description)
            @Html.ValidationMessageFor(model => model.Description)
        </div>

        <div class="editor-label">
            Upload Thumbnail Image
        </div>
        <input id="thumbFileUpload" name="files" type="file" />

        <div class="editor-label">
            Upload Normal Image
        </div>
        <input id="fileUpload" name="files" type="file" />

        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to Images", "Index")&nbsp;&nbsp;|&nbsp;&nbsp;@Html.ActionLink("Back to Artists", "Index", "Artists")
</div>
